Skip to content

Space: Add get_children#61

Draft
PenguinBoi12 wants to merge 7 commits into
mainfrom
feature/space-get_children
Draft

Space: Add get_children#61
PenguinBoi12 wants to merge 7 commits into
mainfrom
feature/space-get_children

Conversation

@PenguinBoi12

@PenguinBoi12 PenguinBoi12 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This PR adds get_children to the new Space class. get_children retrieves all children and converts them into Room or Space instance through the make_room factory. Bot also leverages the new make_room factory.

The PR includes a module-level registry in room.py to centralize the creation logic of Room and Space. This avoids duplicating the instantiation logic while keeping Room and Space cleanly separated. The registry uses __init_subclass__ so subclasses self-register, avoiding a standalone factory module that would have added circular imports.

@PenguinBoi12 PenguinBoi12 changed the title Space get children Space get_children Jun 23, 2026
@PenguinBoi12 PenguinBoi12 changed the title Space get_children Space: Add get_children Jun 23, 2026
# Conflicts:
#	matrix/bot.py
#	matrix/space.py
#	tests/test_bot.py
@PenguinBoi12 PenguinBoi12 force-pushed the feature/space-get_children branch from 3e197f2 to 2b449b0 Compare June 23, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant